<template>
    <div id='myRain' style='width:100%;height:400px;min-height: 200px'></div>
</template>

<script>
    export default {
        name: "rain",
        data(){
            return{

            }
        },
        mounted() {
            this.drawLine();
        },
        methods:{
            drawLine(){
                let myChart = this.$echarts.init(document.getElementById('myRain'))
                // 绘制图表
                myChart.setOption({
                    title: { text: '降雨量',x:'center' },
                    tooltip: {},
                    xAxis: {
                        type:'category',
                        data: ["11:30","12:00","12:30","13:00","13:30","14:00","14:30","15:00","15:30","16:00"]
                    },
                    yAxis: {},
                    series: [{
                        name: 'ml',
                        type: 'line',
                        data: ["19.2", 20, '24.2', 25, 25.7, 27.3,28.5,30.6,29.5,29.2]
                    }]
                });

            }
        }
    }
</script>

<style scoped>

</style>
